package Operation;

import JavaBeans.*;

public class DisplayOperation implements IOperation{

    @Override
    public void operate(BookList bookList) {
        System.out.println("显示图书");
        if(bookList.getCurrentCount() == 0){
            System.out.println("当前书架为空！");
            return;
        }
        for (int i = 0; i < bookList.getCurrentCount(); i++) {
            System.out.println(bookList.getBook(i));
        }
    }
}
